Optimal. Leaf size=103 \[ \frac {2 a^{5/2} \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}+\frac {8 a^2 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c f}-\frac {2 a^3 \tan (e+f x)}{c f \sqrt {a+a \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3989, 3972,
472, 209} \begin {gather*} \frac {2 a^{5/2} \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{c f}-\frac {2 a^3 \tan (e+f x)}{c f \sqrt {a \sec (e+f x)+a}}+\frac {8 a^2 \cot (e+f x) \sqrt {a \sec (e+f x)+a}}{c f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 472
Rule 3972
Rule 3989
Rubi steps
\begin {align*} \int \frac {(a+a \sec (e+f x))^{5/2}}{c-c \sec (e+f x)} \, dx &=-\frac {\int \cot ^2(e+f x) (a+a \sec (e+f x))^{7/2} \, dx}{a c}\\ &=\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {\left (2+a x^2\right )^2}{x^2 \left (1+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac {\left (2 a^2\right ) \text {Subst}\left (\int \left (a+\frac {4}{x^2}-\frac {a}{1+a x^2}\right ) \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac {8 a^2 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c f}-\frac {2 a^3 \tan (e+f x)}{c f \sqrt {a+a \sec (e+f x)}}-\frac {\left (2 a^3\right ) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac {2 a^{5/2} \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c f}+\frac {8 a^2 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c f}-\frac {2 a^3 \tan (e+f x)}{c f \sqrt {a+a \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.74, size = 96, normalized size = 0.93 \begin {gather*} \frac {2 a^3 \left (-\text {ArcTan}\left (\sqrt {-1+\sec (e+f x)}\right ) (-1+\cos (e+f x))+(-1+5 \cos (e+f x)) \sqrt {-1+\sec (e+f x)}\right ) \sec (e+f x) \tan (e+f x)}{c f (-1+\sec (e+f x))^{3/2} \sqrt {a (1+\sec (e+f x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 120, normalized size = 1.17
method | result | size |
default | \(\frac {\left (-\sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )+10 \cos \left (f x +e \right )-2\right ) \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, a^{2}}{c f \sin \left (f x +e \right )}\) | \(120\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.15, size = 315, normalized size = 3.06 \begin {gather*} \left [\frac {\sqrt {-a} a^{2} \log \left (-\frac {8 \, a \cos \left (f x + e\right )^{3} - 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 4 \, {\left (5 \, a^{2} \cos \left (f x + e\right ) - a^{2}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{2 \, c f \sin \left (f x + e\right )}, \frac {a^{\frac {5}{2}} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \, {\left (5 \, a^{2} \cos \left (f x + e\right ) - a^{2}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{c f \sin \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {a^{2} \sqrt {a \sec {\left (e + f x \right )} + a}}{\sec {\left (e + f x \right )} - 1}\, dx + \int \frac {2 a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} - 1}\, dx + \int \frac {a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} - 1}\, dx}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 268 vs.
\(2 (93) = 186\).
time = 1.25, size = 268, normalized size = 2.60 \begin {gather*} \frac {\frac {2 \, \sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a} a^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a\right )} c} - \frac {\sqrt {-a} a^{3} \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{c {\left | a \right |}} - \frac {8 \, \sqrt {2} \sqrt {-a} a^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - a\right )} c}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}}{c-\frac {c}{\cos \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________